// 统一注册全局组件并导出到main.js中
import PageTools from '@/components/PageTools'
import UploadExcel from '@/components/UploadExcel'
import UploadImg from '@/components/UploadImg'
import ImageHolder from '@/components/ImageHolder'
// 将所有导入的所有组件模块组成一个组件数组
const components = [PageTools, UploadExcel, UploadImg, ImageHolder]
export default {
  install(Vue) {
    // Vue.component('PageTools', PageTools)
    // element对全局组件的统一注册方法
    // 对所有的组件数组进行遍历，统一进行遍历
    components.forEach(component => {
      Vue.component(component.name, component)
    })
  }
}
